package AlarmIRPConstDefs;


/**
 * Generated from IDL struct "ThresholdInfo".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public final class ThresholdInfoHelper
{
	private static org.omg.CORBA.TypeCode _type = null;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			_type = org.omg.CORBA.ORB.init().create_struct_tc(AlarmIRPConstDefs.ThresholdInfoHelper.id(),"ThresholdInfo",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("attribute_id", org.omg.CORBA.ORB.init().create_string_tc(0), null),new org.omg.CORBA.StructMember("observed_value", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)), null),new org.omg.CORBA.StructMember("threshold_level", AlarmIRPConstDefs.ThresholdLevelIndOptHelper.type(), null),new org.omg.CORBA.StructMember("arm_time", org.omg.CORBA.ORB.init().create_string_tc(0), null)});
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final AlarmIRPConstDefs.ThresholdInfo s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static AlarmIRPConstDefs.ThresholdInfo extract (final org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}

	public static String id()
	{
		return "IDL:AlarmIRPConstDefs/ThresholdInfo:1.0";
	}
	public static AlarmIRPConstDefs.ThresholdInfo read (final org.omg.CORBA.portable.InputStream in)
	{
		AlarmIRPConstDefs.ThresholdInfo result = new AlarmIRPConstDefs.ThresholdInfo();
		result.attribute_id=in.read_string();
		result.observed_value=in.read_float();
		result.threshold_level=AlarmIRPConstDefs.ThresholdLevelIndOptHelper.read(in);
		result.arm_time=in.read_string();
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final AlarmIRPConstDefs.ThresholdInfo s)
	{
		out.write_string(s.attribute_id);
		out.write_float(s.observed_value);
		AlarmIRPConstDefs.ThresholdLevelIndOptHelper.write(out,s.threshold_level);
		out.write_string(s.arm_time);
	}
}
